<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>速度中国工时系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/admin.css" media="all">
    <link rel="stylesheet" href="/css/login.css" media="all">
</head>

<style>
    .layui-btn {
        background-color: #3281ce;
    }
</style>
<body style="background: url(/images/meteorshower2.jpg) no-repeat top center;"
      onkeydown="keyLogin()">

<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login"
     style="display: none;">

    <div class="layadmin-user-login-main">
        <div class="layadmin-user-login-box layadmin-user-login-header">
            <h2>速度中国工时系统</h2>
        </div>
        <div class="layadmin-user-login-box layadmin-user-login-body layui-form"
             style="background:#fff;">
            <span style="margin-bottom: 15px ; text-align: center;display: block;">用户登录</span>
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-username"
                       for="LAY-user-login-username"></label>
                <input type="text" name="username" id="LAY-user-login-username"
                       lay-verify="required" placeholder="用户名" class="layui-input"
                       value="admin">
            </div>
            <div class="layui-form-item">
                <label class="layadmin-user-login-icon layui-icon layui-icon-password"
                       for="LAY-user-login-password"></label>
                <input type="password" name="password" id="LAY-user-login-password"
                       lay-verify="required" placeholder="密码" class="layui-input"
                       value="123456">
            </div>
            <div class="row" th:if="${captchaEnabled==true}">
                <div class="layui-form-item" style="float: left;">
                    <label class="layadmin-user-login-icon layui-icon layui-icon-vercode"
                           for="LAY-user-login-password"></label>
                    <input type="text" name="validateCode" lay-verify="required" placeholder="验证码"
                           class="layui-input form-control code">

                </div>

                <div style="float: right;width: 100px;">
                    <a href="javascript:void(0);" title="点击更换验证码">
                        <img th:src="@{captcha/captchaImage(type=${captchaType})}"
                             class="imgcode"
                             width="100px" height="40px"/>
                    </a>
                </div>
            </div>
            <!--<div class="layui-form-item jzmm-div" style="margin-top:10px;">-->
            <div class="layui-form-item">
                <input type="checkbox" name="rememberme" lay-skin="switch"/><span>记住密码</span>
            </div>
            <div class="layui-form-item">
                <button id="btnSubmit" class="layui-btn layui-btn-fluid"
                        data-loading="正在验证登录，请稍后...">登 入
                </button>
            </div>
        </div>
    </div>
    <div class="layui-trans layadmin-user-login-footer">
        <p><a target="_blank">Copyright © 2018 SpeedChina. All right reserved. </a></p>
    </div>
</div>

<script src="/js/jquery.min.js"></script>
<!-- 验证插件 -->
<script src="../static/ajax/libs/validate/jquery.validate.min.js"
        th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
<script src="../static/ajax/libs/validate/messages_zh.min.js"
        th:src="@{/ajax/libs/validate/messages_zh.min.js}"></script>
<script src="../static/ajax/libs/layer/layer.min.js"
        th:src="@{/plugins/layui/layui.js}"></script>
<script src="../static/ajax/libs/iCheck/icheck.min.js"
        th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js"
        th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script src="../static/js/login.js" th:src="@{/js/login.js}"></script>
<script src="../static/js/ry-ui.min.js" th:src="@{/js/ry-ui.min.js}"></script>
<script>
    loadTopWindow();

    function loadTopWindow() {
        if (window.top != null && window.top.document.URL != document.URL) {
            window.top.location = document.URL; //这样就可以让登陆窗口显示在整个窗口了
        }
    }

    layui.use('form', function () {
        var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功

        //……

        //但是，如果你的HTML是动态生成的，自动渲染就会失效
        //因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
        form.render();
    });

</script>
</body>
</html>
